import pymysql

if __name__ == '__main__':
    # **********begin********** #
    conn = pymysql.connect(host='localhost',
                            port=3306,
                            user='root',
                            passwd='123123',
                            db='nudt')
    cursor = conn.cursor()

    sql = """
        create table Course(
            Cno char(10)  primary key,
            Cname char(100),
            Tno char(10)
        );

        create table Teacher(
            Tno char(10) primary key,
            Tname char(100) ,
            Tsex char(10) 
        );
    """

    cursor.execute(sql)
    cursor.close()
    conn.close()
   


    # **********end********** #
   
   
